import * as api from '../../utils/api'
import axios from '../../utils/http'

const state = {
    tableData: [],
    searchData: {
        disponse_status: '待审核',
        end_time: '',
        limit: '5',
        number: '',
        number_type: '订单号',
        page: '1',
        real_estate_name: '',
        start_time: '',
        user_phone: '',
    },
    RefundDetailsData: {}
}
const actions = {
    changeRefundDetailsDataA(obj, data) {
        obj.commit('changeRefundDetailsDatM', data)
    },
    changedataActions(obj, data1) {
        // console.log(data1);
        axios({
            url: api.transactionselectRefundOrders,
            method: 'get',
            params: state.searchData,
        }).then(data => {
            // console.log(data);
            if (data.status == 200) {
                obj.commit('changedataMutations', data)
            }
        }).catch(err => {
            console.log(err);
        })

    }
}

const mutations = {
    changeRefundDetailsDatM(state, data) {
        state.RefundDetailsData = data

    },
    changedataMutations(state, data) {
        console.log(data.data.dataList);

        state.tableData = data.data.dataList
    }

}

const getters = {}


export default {
    state,
    actions,
    mutations,
    getters
}